Skip to main content

All Questions

Tagged with
2votes
3answers
203views

How can I avoid chasing my own tail when testing against complicated return values?

Sometimes there are functions that return complicated data and cannot be divided any further e.g. in the area of signal processing or when reading and decoding a bytestring to another format. How am I ...
Agent49's user avatar
124votes
9answers
53kviews

How exactly should unit tests be written without mocking extensively?

As I understand, the point of unit tests is to test units of code in isolation. This means, that: They should not break by any unrelated code change elsewhere in the codebase. Only one unit test ...
Alex Lomia's user avatar
2votes
4answers
2kviews

Test Doubles, Mocks and Stubs - when not to use & why, for Ruby, Rspec

I've learned about mocking and stubbing and I've seen how they can help me create great test suites that run blindingly fast and thus speed up my development process hugely. However I've also seen ...
Michael Durrant's user avatar
3votes
1answer
303views

Stubbing and mocking boundaries

Suppose I'm building a JSON API and would like to include an endpoint that returns a list of recently created posts. Somewhere in my system is an existing Post model with the following test: create a ...
scttnlsn's user avatar

close